<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMergeOrderItemsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('merge_order_items', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->bigInteger('merge_order_id')->index()->comment('订单ID');
            $table->bigInteger('order_id')->index()->comment('对应的订单ID');
            $table->integer('order_amount')->comment('支付金额');
            $table->integer('service_fee')->comment('手续费');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('merge_order_items');
    }
}
